namespace Launcher.View.Model

import System
import System.Drawing

import Launcher.Model

class LauncherItem:
"""Description of LauncherItem"""

	[getter(Model)]
	_appInfo as ApplicationInfo
	
	[getter(TooltipText)]	
	_tooltipText as string

	[getter(Icon)]
	_icon as Drawing.Icon

	def constructor(appInfo as ApplicationInfo):
		_appInfo = appInfo
		_tooltipText = GetTooltipText()
		_icon = GetIcon()
		
	private def GetTooltipText():
		if not string.IsNullOrEmpty(_appInfo.Description.Trim()):
			return _appInfo.Description
		return "${_appInfo.Path} ${_appInfo.Arguments}"

	private def GetIcon():
		return _appInfo.Icon
